Utility.generateNextNames Method

Generates the next name and friendly name to be used for some item. For example, if "adapter" prefix and a dashboard search object is given, "adapter 1", "adapter1" may be returned.
 

Parameters

prefix

Type: String
The prefix to search and generate for.
searchObject

Type: Object
The object which should be searched to find the next number to generate. The object is stringified and searched.

Return Value


Type: Object
An object that looks like:
 friendlyName    [type: String] - The full friendly name generated.
 name            [type: String] - The full name generated.